@extends('backend::layout')
@section('title',$page_title)
@include('backend::component.upload.upload_js')
@section('content')
    @component('backend::cms.message.msg_frame')
        @slot('ext_tab')
            <li class="nav-item">
                <a class="nav-link active" href="javascript:;">
                    <i class="hcl hcl-msg mr-2"></i>{{$page_title}}
                </a>
            </li>
        @endslot
        @slot('content')
            @component('backend::component.form.form-group')
                @slot('title')  <h2>{{$message->title}}</h2>@endslot
            @endcomponent

            @component('backend::component.form.form-group')
                @slot('title') 发件人:
                    @if($message->fromUser)
                        {{$message->fromUser->user_number}}[{{$message->fromUser->real_name}}]
                    @else
                        我
                    @endif
                @endslot
            @endcomponent
            @component('backend::component.form.form-group')
                @slot('title') 收件人:
                    @if($message->toUser)
                        {{$message->toUser->user_number}}[{{$message->toUser->real_name}}]
                    @else
                        我
                    @endif
                @endslot
            @endcomponent
            @component('backend::component.form.form-group')
                @slot('title') 时间:{{$message->created_at}}@endslot
            @endcomponent

            @component('backend::component.form.form-group')
                @slot('title') 留言信息 @endslot
                @component('backend::cms.message.msg_tpl')
                    @slot('msg_content') {{$message->content}} @endslot
                    @slot('msg_img') {{$message->msg_img}} @endslot
                @endcomponent
            @endcomponent

            @if($message->is_reply)
                @component('backend::component.form.form-group')
                    @slot('title') 回复信息 @endslot
                    @component('backend::cms.message.msg_tpl')
                        @slot('msg_content') {{$message->reply}} @endslot
                        @slot('msg_img') {{$message->reply_img}} @endslot
                    @endcomponent
                @endcomponent
                @component('backend::component.form.form-group')
                    @slot('title') 回复时间:{{$message->replied_at}}@endslot
                @endcomponent
            @endif
        @endslot
    @endcomponent
@endsection